package ioc07;

import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Test {
    public static void main(String[] args) {
        //SomeBean someBean = new SomeBean("mao");
        ClassPathXmlApplicationContext ac = new ClassPathXmlApplicationContext("ioc07/spring.xml");
        SomeBean someBean = (SomeBean) ac.getBean("someBean");

        //ac.destroy();
        ac.registerShutdownHook();
        //Runtime.getRuntime().gc();
        System.out.println("test1");
        SomeBean someBean2 = (SomeBean) ac.getBean("someBean");
        System.out.println("test2");
        while (true)
        {}

    }
}
